package com.lil.qmui;

import android.view.View;

import com.lil.qmui.ui.base.TitleViewActivity;
import com.lil.qmui.view.TitleBarView;
import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton;

import butterknife.BindView;

public class MainActivity extends TitleViewActivity {

    //圆角button
    @BindView(R.id.qmuiroundbutton)
    QMUIRoundButton qmuiroundbutton;
    @BindView(R.id.qmuiroundbutton3)
    QMUIRoundButton qmuiroundbutton3;
    @BindView(R.id.qmuiroundbutton2)
    QMUIRoundButton qmuiroundbutton2;

    @BindView(R.id.title_view)
    TitleBarView title_view;

    @Override
    public void init() {
        setContentView(R.layout.activity_main);
    }

    @Override
    public void data() {
        initTitleBar();
        initUI();
    }

    private void initTitleBar() {
        initTitleView();
        initLeftBackView(null);
        setCenterViewContent("腾讯ui");
        title_view.setRightViewOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    private void initUI() {
        //圆角button透明度开启
        qmuiroundbutton2.setChangeAlphaWhenPress(true);
        qmuiroundbutton3.setChangeAlphaWhenPress(true);
    }


}
